<style>
.c_name:hover .city_ul{
	display:block;
	}
.city_ul{
	border-radius:3px;
	border:1px solid #efefef;
	z-index:99;
	position:absolute;
	float:right;
	width:100px;
	background-color:#FFF;
	
	right:21px;
	display:none;
	}		
.city_ul li{
	height:30px;
	line-height:30px;
	text-align:center;
	border-bottom:1px solid #efefef;
	
	}

</style>

<div class="box_right">

<div style="clear:both; overflow:hidden;">
	<h1 style="float:left;">
		订单统计
	</h1>
    <div style=" padding: 20px 20px;float:right; width:200px; font-size:1.3em;">城市: <ul style="width:100px;float:right;"><li class="c_name" style="   text-align:center;border:1px solid #CCC; border-radius:15px;"><a href=""><span id="c_text"><?php if(!empty($city[$current_city])):?><?php echo $city[$current_city]['name']?><?php else:?>全部<?php endif?></span></a><ul class="city_ul">
                    	<li><a href="<?php echo site_url()?>admin/index/index?city=-1" data-toggle="modal">全部</a></li>
						<?php foreach($city as $v):?>
                        <li><a href="<?php echo site_url()?>admin/index/index?city=<?php echo $v['id']?>" data-toggle="modal"><?php echo $v['name']?></a></li>
                        <?php endforeach;?>
                    </ul></li></ul></div>
	
</div>    
	<div class="pro_box">
			<div class="line">
				<ul class="layui-row">
                 <a href="<?php echo site_url();?>admin/index/index?type=user" style="color:#FFF; display:block;">
					<li class="lf <?php if(empty($_GET['type'])||$_GET['type']=='user'):?>active<?php endif;?>">
                    
						<b><?php echo $today_user;?></b>
						<p>当日新增用户数</p>
                      
					</li>
                     </a>
                     <a href="<?php echo site_url();?>admin/index/index?type=order" style="color:#FFF;display:block;">
					<li class="cet <?php if(!empty($_GET['type'])&&$_GET['type']=='order'):?>active<?php endif;?>">
                    	
						<b><?php echo $today_order;?></b>
						<p>当日交易笔数（单）</p>
                       
					</li>
                     </a>
                     <a href="<?php echo site_url();?>admin/index/index?type=price" style="color:#FFF;display:block;">
					<li class="rt <?php if(!empty($_GET['type'])&&$_GET['type']=='price'):?>active<?php endif;?>">
                    	
						<b><?php echo $today_price;?></b>
						<p>当日交易金额（元）</p>
                       
					</li>
                     </a>
				</ul>
				<div id="main" style="height: 500px;">
					
				</div>
			</div>
			  <br>
			  <div class="order_list">
			  	<div class="layui-row">
			  		<div class="layui-col-xs4">
			  			<h2 class="order_list_h">订单列表</h2>
			  		</div>
			  		
			  	</div>
			  		
				
		<table class="layui-table" lay-skin="line">
		  <thead>
		    <tr>
			  <th>订单号</th>
			  <th>时间</th>
			  <th>车牌号</th>
			  <th>油枪/商品</th>
			  <th>付款方式</th>
			  <th>加油金额</th>
			  <th>折后金额</th>
		    </tr> 
		  </thead>
          <tbody>
          
          <?php if(!empty($result)):?>
          
          	<?php foreach($result as $v):?>
          	<tr>
			  <td><?php echo $v['order_no'];?></td>
			  <td><?php echo $v['create_time'];?></td>
			  <td><?php echo $v['car_card'];?></td>
			  <td><?php echo $v['oilgun_name'].'/'.$v['glmodel_name'];?></td>
			  <td>
              	<?php
                    if(!empty($v['from_third'])){
						echo '第三方平台支付';
					}elseif($v['payment_id'] == 2){
                        echo "支付宝支付";
                    }elseif($v['payment_id'] == 3){
                    	echo "微信公众号支付";
                    }elseif($v['payment_id'] == 6){
                    	echo "支付宝APP支付";
					}elseif($v['payment_id'] == 7){
                    	echo "微信APP支付";
					}elseif($v['payment_id'] == 8){
                    	echo "钱包支付";
					}elseif($v['payment_id'] == 9){
						echo "小程序支付";
					}
					?>
              </td>
			  <td><?php echo $v['machine_price'];?></td>
			  <td><?php echo $v['zhe_price'];?></td>

		    </tr>
            <?php endforeach;?>
            <?php else:?>
            <tr>
			  <td colspan="7" align="center">暂无订单</td>
		    </tr>
          <?php endif;?>
          </tbody>
	
		</table>		
	</div> 
	</div>
</div>
<script>

// 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'));

        // 指定图表的配置项和数据
        option = {
			tooltip : {
				trigger: 'axis',
				axisPointer : {            // 坐标轴指示器，坐标轴触发有效
					type : 'line'        // 默认为直线，可选为：'line' | 'shadow'
				}
			},
			xAxis: {
				type: 'category',
				data:[]
			},
			yAxis: {
				type: 'value'
			},
			series: [{
				data: [],
				type: 'line',
				smooth: true
			}]
		};

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);

</script>
